package cn.iocoder.yudao.module.infra.service.ocr;

import cn.iocoder.yudao.module.infra.api.ocr.dto.OcrRecognizeRespDTO;
import cn.iocoder.yudao.module.infra.controller.admin.ocr.vo.OcrRecognizeRespVO;

/**
 * OCR Recognition Service Interface
 *
 * @author YuDao
 */
public interface OcrService {

    /**
     * Recognize text from image using OCR
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result
     */
    OcrRecognizeRespVO recognizeText(Long configId, Long fileId);

    /**
     * Recognize general text from image
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result
     */
    OcrRecognizeRespVO recognizeGeneralText(Long configId, Long fileId);

    /**
     * Recognize ID card from image
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result
     */
    OcrRecognizeRespVO recognizeIdCard(Long configId, Long fileId);

    /**
     * Recognize business license from image
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result
     */
    OcrRecognizeRespVO recognizeBusinessLicense(Long configId, Long fileId);

    /**
     * Recognize bank card from image
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result
     */
    OcrRecognizeRespVO recognizeBankCard(Long configId, Long fileId);

    /**
     * Recognize driving license from image
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result
     */
    OcrRecognizeRespVO recognizeDrivingLicense(Long configId, Long fileId);

    /**
     * Recognize vehicle license from image
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result
     */
    OcrRecognizeRespVO recognizeVehicleLicense(Long configId, Long fileId);

    // ========== API methods (for Feign calls) ==========

    /**
     * Recognize ID card from image (for API calls)
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result (API format)
     */
    OcrRecognizeRespDTO recognizeIdCardForApi(Long configId, Long fileId);

    /**
     * Recognize driving license from image (for API calls)
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result (API format)
     */
    OcrRecognizeRespDTO recognizeDrivingLicenseForApi(Long configId, Long fileId);

    /**
     * Recognize text from image (for API calls)
     *
     * @param configId OCR configuration ID
     * @param fileId File ID
     * @return OCR recognition result (API format)
     */
    OcrRecognizeRespDTO recognizeTextForApi(Long configId, Long fileId);

}